package com.fjec.activity.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjec.activity.entity.BizExchangeGift;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 010.兑换礼物表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2020-12-08
 */
public interface BizExchangeGiftMapper extends BaseMapper<BizExchangeGift> {

    /**
     * 兑换礼物分页条件查询
     *
     * @param page
     * @param searchBy
     * @param condition
     * @param startTime
     * @param endTime
     * @return
     */
    Page<BizExchangeGift> getExchangeGiftPage(@Param("page") Page page,
                                              @Param("searchBy") Integer searchBy,
                                              @Param("condition") String condition,
                                              @Param("startTime") LocalDateTime startTime,
                                              @Param("endTime") LocalDateTime endTime);

    /**
     * 兑换礼物条件查询
     *
     * @param startTime
     * @param endTime
     * @return
     */
    List<BizExchangeGift> getExchangeGiftByDate(@Param("startTime") LocalDateTime startTime,
                                                @Param("endTime") LocalDateTime endTime);
}
